namespace CSharpPro._1021;

public class Student
{
    private int id;
    private string name;
    private string userEmail;
    

    public int Id
    {
        get
        {
            return id;
        }
        set
        {
            if (value < 0)
            {
                throw new ArgumentException("Id cannot be negative.");
            }
            id = value;
        }
    }

    public string Name
    {
        get => name;
        set => name = value;
    }

    public string UserEmail
    {
        get => userEmail;
        set => userEmail = value;
    }
    public Student(int id, string name)
    {
        this.id = id;
        this.name = name;
    }

    public override string ToString()
    {
        return $"id: {id}, name: {name},email:{userEmail}";
    }
}